<nav class="top" th:fragment="html">

    <span>欢迎
    	<span th:if="${null!=session.user}">
			<a th:text="${session.user.name}"></a>
			<a href="login">首页</a>
			<a href="forelogout">退出</a>
		</span>
	</span>

    <span th:if="${null==session.user}">
		<a href="login">请登录</a>
		<a href="register">免费注册</a>
	</span>

</nav>



